'use strict'
const _ = require('lodash')
const moment = require('moment')
const Env = use('Env')
const { ExhibitorReceipt, FaManyStore, Admin } = require("../../../Models");
class DebuggerController {
  async createUser({ request, response, params }) {
    // const list = (await FaManyStore.query().fetch()).toJSON()
    let list = (await FaManyStore.query().fetch()).toJSON()
    let users = [];
    // for (let item of list) {
    //   users.push({ name: item.nickname, password: "china2021", type: 2, exhibitorID: item.id })
    // }
    // users.push({ name:'admin', password: "admin2021", type: 1 })
    await Admin.createMany(users)
    response.json({ error: 0, data: users, length: users.length })
  }
}
module.exports = DebuggerController